
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>用户主页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="/static/res/layui/css/layui.css">
  <link rel="stylesheet" href="/static/res/css/global.css">
</head>
<body style="margin-top: 65px;">

<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="/">
      <img src="/static/res/images/logo.png" alt="layui">
    </a>
{#    <ul class="layui-nav fly-nav layui-hide-xs">#}
{#      <li class="layui-nav-item layui-this">#}
{#        <a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>#}
{#      </li>#}
{#      <li class="layui-nav-item">#}
{#        <a href="../case/case.html"><i class="iconfont icon-iconmingxinganli"></i>案例</a>#}
{#      </li>#}
{#      <li class="layui-nav-item">#}
{#        <a href="http://www.layui.com/" target="_blank"><i class="iconfont icon-ui"></i>框架</a>#}
{#      </li>#}
{#    </ul>#}
    
    <ul class="layui-nav fly-nav-user">
      <!-- 登入后的状态 -->
      <li class="layui-nav-item">
            <a class="fly-nav-avatar" href="javascript:;">
                <cite class="layui-hide-xs">{{ user.nick_name }}</cite>
                {% if not user.credentials %}
                    {#                <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>#}
                {% else %}
                    <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>
                {% endif %}
                {% if user.vip_leven ==0 %}
                    {#                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>#}
                {% else %}
                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>
                {% endif %}
                <img src={{ user.avatar_url }}>
            </a>
            <dl class="layui-nav-child">
                <dd><a href="/user/set"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
{#                <dd><a href="/user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a>#}
                </dd>
                <dd><a href="/user/home"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a>
                </dd>
                <hr style="margin: 5px 0;">
                <dd><a href="/passport/logout" style="text-align: center;">退出</a></dd>
            </dl>
        </li>
    </ul>
  </div>
</div>

<div class="fly-home fly-panel" >
  <img src="{{ user.avatar_url }}" alt="头像">
  <i class="iconfont icon-renzheng" title="{{ user.credentials }}"></i>
  <h1>
    {{ user.nick_name }}
    <i class="iconfont icon-nan"></i>
    <!-- <i class="iconfont icon-nv"></i>  -->
    <i class="layui-badge fly-badge-vip">VIP3</i>
    <!--
    <span style="color:#c00;">（管理员）</span>
    <span style="color:#5FB878;">（社区之光）</span>
    <span>（该号已被封）</span>
    -->
  </h1>

  <p style="padding: 10px 0; color: #5FB878;">认证信息：{{ user.credentials }}</p>

  <p class="fly-home-info">
    <i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">{{ user.fly_kiss }} 飞吻</span>
    <i class="iconfont icon-shijian"></i><span>{{ user.create_time }}加入</span>
    <i class="iconfont icon-chengshi"></i><span>来自{{ user.city }}</span>
  </p>

  <p class="fly-home-sign">{{ user.signature }}</p>

{#  <div class="fly-sns" data-user="">#}
{#    <a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>#}
{#    <a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>#}
{#  </div>#}
</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6 fly-home-jie">
      <div class="fly-panel">
        <h3 class="fly-panel-title">{{ user.nick_name }} 最近的提问</h3>

                    <ul class="jie-row">
                        {% for post in time_Rank %}
{#                      <li>#}
{#                        <span class="fly-jing">精</span>#}
{#                        <a href="" class="jie-title"> 基于 layui 的极简社区页面模版</a>#}
{#                        <i>刚刚</i>#}
{#                        <em class="layui-hide-xs">1136阅/27答</em>#}
{#                      </li>#}
                      <li>
                        <a href="/detail/{{ post.id }}" class="jie-title"> {{ post.title }}</a>
                        <i>{{ post.create_time  }}</i>
                        <em class="layui-hide-xs">{{ post.clicks }}阅/{{ post.comments.count() }}答</em>
                      </li>
                        {% endfor %}
                  <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div> -->
                </ul>

      </div>
    </div>
    
    <div class="layui-col-md6 fly-home-da">
      <div class="fly-panel">

            <h3 class="fly-panel-title">{{ user.nick_name }} 最近的回答</h3>
            <ul class="home-jieda">
                {% for comment in post_paginate_comments.items %}
                  <li>
                  <p>
        {#          <span>1分钟前</span>#}
                  在<a href="" target="_blank">{{ comment.post.title }}</a>中回答：
                  </p>
                  <div class="home-dacontent">
                      {{ comment.content}}
                  </div>
                </li>
                 {% endfor %}
          <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div> -->
        </ul>
      </div>
    </div>
  </div>
</div>

<div class="fly-footer">
    <p><a href="#" target="_blank">Flask项目</a> 2020 &copy; <a href="#" target="_blank">zqy出品</a></p>

</div>

<script src="/static/res/layui/layui.js"></script>
<script src="/static/res/mods/index.js"></script>
<script>
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '/static/res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '/static/res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

</body>
</html>